package com.hippoDocker.consulorder.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName RestTemplateConfig
 * @Description TODO RestTemplate配置
 * @Author hippoDocker
 * @Date 2022/5/30 9:54
 **/
@Configuration
public class RestTemplateConfig {

    @Bean
    @LoadBalanced //使用@LoadBalanced注解嘘予RestTemplate负载均衡的能无
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
